#include "../head/server.h"

// 添加描述符fd到epoll监听集合
int epollAddFD(int epoll_fd, int fd)
{
	struct epoll_event event;
	event.data.fd = fd;
	event.events = EPOLLIN;
	epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &event);
	return 0;
}
// 从epoll监听集合中删除描述符fd
int epollDelFD(int epoll_fd, int fd)
{
	epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, NULL);
	return 0;
}
